from pathlib import Path
from flask import Blueprint, send_file
from config import STATIC_FOLDER
import os

static_bp = Blueprint("static", __name__, static_folder=STATIC_FOLDER)


@static_bp.route("/")
@static_bp.route("/<path:filename>")
def serve_static(filename="index.html"):
    return send_file(Path(STATIC_FOLDER, filename))


__all__ = ["static_bp"]
